home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM BV3 / BMUG PD-ROM Version BV3 (CDRM1097900).iso / HyperCard / Education / Weights & Measures / card_3233.txt < prev    next >
Text File  |  1991-10-27  |  11KB  |  549 lines

  1. -- card: 3233 from stack: in
  2. -- bmap block id: 6384
  3. -- flags: 4000
  4. -- background id: 2785
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on calculate
  8.   global x
  9.   set lockscreen to true
  10.   put .304799999985 into c
  11.   put x/1000 into card field 1
  12.   put x into card field 2
  13.   put x*100 into card field 3
  14.   put x * 1000 into card field 4
  15.   put (x / c) /5280 into card field 5
  16.   put (x / c) /3 into card field 6
  17.   put (x / c) into ft
  18.   put ft into card field 7
  19.   put trunc(ft) into fta
  20.   put fta&"' " into item 1 of card field 8
  21.   set numberformat to "0.######"
  22.   put (ft- fta)*12 into ftb
  23.   put " "&ftb"e into item 2 of card field 8
  24.   put ft*12 into inch
  25.   put inch into card field 9
  26.   put trunc(inch) into incha
  27.   put incha"e&"  " into item 1 of card field 10
  28.   set numberformat to "0"
  29.   put (inch- incha)*32 into inchb
  30.   put "   "&inchb&" /32" into item 2 of card field 10
  31.   set numberformat to "0.######"
  32.   put x/(1.15156*5280*c)into card field 11
  33.   put x/299793052.4119 into card field 12
  34.   set lockscreen to false
  35. end calculate
  36.  
  37.  
  38. -- part 1 (button)
  39. -- low flags: 00
  40. -- high flags: A002
  41. -- rect: left=9 top=85 right=107 bottom=109
  42. -- title width / last selected line: 0
  43. -- icon id / first selected line: 0 / 0
  44. -- text alignment: 1
  45. -- font id: 0
  46. -- text size: 12
  47. -- style flags: 0
  48. -- line height: 16
  49. -- part name: Kilometers
  50. ----- HyperTalk script -----
  51. on mouseUp
  52.   global x
  53.   ask "Enter Value"
  54.   put it * 1000 into x
  55.   calculate
  56. end mouseUp
  57.  
  58.  
  59.  
  60. -- part 2 (button)
  61. -- low flags: 00
  62. -- high flags: A002
  63. -- rect: left=8 top=142 right=164 bottom=108
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 0 / 0
  66. -- text alignment: 1
  67. -- font id: 0
  68. -- text size: 12
  69. -- style flags: 0
  70. -- line height: 16
  71. -- part name: Meters
  72. ----- HyperTalk script -----
  73. on mouseUp
  74.   global x
  75.   ask "Enter Value"
  76.   put it into x
  77.   calculate
  78. end mouseUp
  79.  
  80.  
  81.  
  82. -- part 3 (field)
  83. -- low flags: 00
  84. -- high flags: 0002
  85. -- rect: left=9 top=106 right=126 bottom=109
  86. -- title width / last selected line: 0
  87. -- icon id / first selected line: 0 / 0
  88. -- text alignment: 1
  89. -- font id: 0
  90. -- text size: 12
  91. -- style flags: 0
  92. -- line height: 16
  93. -- part name: 
  94.  
  95.  
  96. -- part 4 (field)
  97. -- low flags: 01
  98. -- high flags: 0002
  99. -- rect: left=8 top=163 right=181 bottom=108
  100. -- title width / last selected line: 0
  101. -- icon id / first selected line: 0 / 0
  102. -- text alignment: 1
  103. -- font id: 0
  104. -- text size: 12
  105. -- style flags: 0
  106. -- line height: 16
  107. -- part name: 
  108.  
  109.  
  110. -- part 5 (button)
  111. -- low flags: 00
  112. -- high flags: A002
  113. -- rect: left=8 top=199 right=221 bottom=108
  114. -- title width / last selected line: 0
  115. -- icon id / first selected line: 0 / 0
  116. -- text alignment: 1
  117. -- font id: 0
  118. -- text size: 12
  119. -- style flags: 0
  120. -- line height: 16
  121. -- part name: Centimeters
  122. ----- HyperTalk script -----
  123. on mouseUp
  124.   global x
  125.   ask "Enter Value"
  126.   put it/100 into x
  127.   calculate
  128. end mouseUp
  129.  
  130.  
  131.  
  132. -- part 6 (button)
  133. -- low flags: 00
  134. -- high flags: A002
  135. -- rect: left=7 top=258 right=280 bottom=107
  136. -- title width / last selected line: 0
  137. -- icon id / first selected line: 0 / 0
  138. -- text alignment: 1
  139. -- font id: 0
  140. -- text size: 12
  141. -- style flags: 0
  142. -- line height: 16
  143. -- part name: Millimeters
  144. ----- HyperTalk script -----
  145. on mouseUp
  146.   global x
  147.   ask "Enter Value"
  148.   put it/ 1000 into x
  149.   calculate
  150. end mouseUp
  151.  
  152.  
  153.  
  154. -- part 7 (field)
  155. -- low flags: 01
  156. -- high flags: 0002
  157. -- rect: left=8 top=220 right=240 bottom=108
  158. -- title width / last selected line: 0
  159. -- icon id / first selected line: 0 / 0
  160. -- text alignment: 1
  161. -- font id: 0
  162. -- text size: 12
  163. -- style flags: 0
  164. -- line height: 16
  165. -- part name: 
  166.  
  167.  
  168. -- part 8 (field)
  169. -- low flags: 01
  170. -- high flags: 0002
  171. -- rect: left=7 top=279 right=299 bottom=107
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 0 / 0
  174. -- text alignment: 1
  175. -- font id: 0
  176. -- text size: 12
  177. -- style flags: 0
  178. -- line height: 16
  179. -- part name: 
  180.  
  181.  
  182. -- part 9 (field)
  183. -- low flags: 01
  184. -- high flags: 0002
  185. -- rect: left=177 top=106 right=126 bottom=277
  186. -- title width / last selected line: 0
  187. -- icon id / first selected line: 0 / 0
  188. -- text alignment: 1
  189. -- font id: 0
  190. -- text size: 12
  191. -- style flags: 0
  192. -- line height: 16
  193. -- part name: 
  194.  
  195.  
  196. -- part 10 (field)
  197. -- low flags: 01
  198. -- high flags: 0002
  199. -- rect: left=179 top=165 right=185 bottom=279
  200. -- title width / last selected line: 0
  201. -- icon id / first selected line: 0 / 0
  202. -- text alignment: 1
  203. -- font id: 0
  204. -- text size: 12
  205. -- style flags: 0
  206. -- line height: 16
  207. -- part name: 
  208.  
  209.  
  210. -- part 11 (field)
  211. -- low flags: 01
  212. -- high flags: 0002
  213. -- rect: left=137 top=223 right=243 bottom=237
  214. -- title width / last selected line: 0
  215. -- icon id / first selected line: 0 / 0
  216. -- text alignment: 1
  217. -- font id: 0
  218. -- text size: 12
  219. -- style flags: 0
  220. -- line height: 16
  221. -- part name: 
  222. ----- HyperTalk script -----
  223. --,foot,feet,ft,
  224.  
  225.  
  226. -- part 12 (field)
  227. -- low flags: 01
  228. -- high flags: 0002
  229. -- rect: left=236 top=223 right=243 bottom=362
  230. -- title width / last selected line: 0
  231. -- icon id / first selected line: 0 / 0
  232. -- text alignment: 1
  233. -- font id: 0
  234. -- text size: 12
  235. -- style flags: 0
  236. -- line height: 16
  237. -- part name: 
  238.  
  239.  
  240. -- part 13 (field)
  241. -- low flags: 01
  242. -- high flags: 0002
  243. -- rect: left=137 top=279 right=299 bottom=237
  244. -- title width / last selected line: 0
  245. -- icon id / first selected line: 0 / 0
  246. -- text alignment: 1
  247. -- font id: 0
  248. -- text size: 12
  249. -- style flags: 0
  250. -- line height: 16
  251. -- part name: 
  252.  
  253.  
  254. -- part 15 (button)
  255. -- low flags: 00
  256. -- high flags: A002
  257. -- rect: left=177 top=85 right=107 bottom=277
  258. -- title width / last selected line: 0
  259. -- icon id / first selected line: 0 / 0
  260. -- text alignment: 1
  261. -- font id: 0
  262. -- text size: 12
  263. -- style flags: 0
  264. -- line height: 16
  265. -- part name: Miles
  266. ----- HyperTalk script -----
  267. on mouseUp
  268.   global x
  269.   put .304799999985 into c
  270.   ask "Enter Value"
  271.   put it *c*5280 into x
  272.   calculate
  273. end mouseUp
  274.  
  275.  
  276.  
  277.  
  278. -- part 16 (button)
  279. -- low flags: 00
  280. -- high flags: A002
  281. -- rect: left=179 top=144 right=166 bottom=279
  282. -- title width / last selected line: 0
  283. -- icon id / first selected line: 0 / 0
  284. -- text alignment: 1
  285. -- font id: 0
  286. -- text size: 12
  287. -- style flags: 0
  288. -- line height: 16
  289. -- part name: Yards
  290. ----- HyperTalk script -----
  291. on mouseUp
  292.   global x
  293.   put .304799999985 into c
  294.   ask "Enter Value"
  295.   put it *c*3 into x
  296.   calculate
  297. end mouseUp
  298.  
  299.  
  300.  
  301. -- part 17 (button)
  302. -- low flags: 00
  303. -- high flags: A002
  304. -- rect: left=181 top=202 right=224 bottom=281
  305. -- title width / last selected line: 0
  306. -- icon id / first selected line: 0 / 0
  307. -- text alignment: 1
  308. -- font id: 0
  309. -- text size: 12
  310. -- style flags: 0
  311. -- line height: 16
  312. -- part name: Feet
  313. ----- HyperTalk script -----
  314. on mouseUp
  315.   global x
  316.   put .304799999985 into c
  317.   ask "Enter Value in DECIMAL or in FT and IN (7' 11""e&")"
  318.   put it into entry
  319.   put offset("'",entry) into f
  320.   if f<> 0 then
  321.     put char 1 to f-1 of entry into ft
  322.     put char f+1 to length(entry)-1 of entry into ina
  323.     put value(ina) into inb
  324.     put ((inb/12)+ft)*c into x
  325.   else
  326.     put it *c into x
  327.   end if
  328.   calculate
  329. end mouseUp
  330.  
  331.  
  332.  
  333. -- part 24 (button)
  334. -- low flags: 00
  335. -- high flags: 0000
  336. -- rect: left=280 top=203 right=225 bottom=380
  337. -- title width / last selected line: 0
  338. -- icon id / first selected line: 0 / 0
  339. -- text alignment: 1
  340. -- font id: 0
  341. -- text size: 12
  342. -- style flags: 0
  343. -- line height: 16
  344. -- part name: New Button
  345.  
  346.  
  347. -- part 18 (button)
  348. -- low flags: 00
  349. -- high flags: A002
  350. -- rect: left=184 top=258 right=280 bottom=284
  351. -- title width / last selected line: 0
  352. -- icon id / first selected line: 0 / 0
  353. -- text alignment: 1
  354. -- font id: 0
  355. -- text size: 12
  356. -- style flags: 0
  357. -- line height: 16
  358. -- part name: Inches
  359. ----- HyperTalk script -----
  360. on mouseUp
  361.   global x
  362.   put .304799999985 into c
  363.   ask "Enter Value in DECIMAL or FRACTION (4 3/8)"
  364.   put it into entry
  365.   put offset("/",entry) into d
  366.   put offset(space,entry) into s
  367.   if d<>0 or s <>0 then
  368.     if s=0 then
  369.       put char 1 to d-1 of entry into a
  370.       put char d+1 to length(entry) of entry into b
  371.       put (a/b)*(c/12) into x
  372.     else
  373.       put char 1 to s-1 of entry into g
  374.       put char s+1 to d-1 of entry into e
  375.       put char d+1 to length(entry) of entry into f
  376.       put ((e/f)+g)*(c/12) into x
  377.     end if
  378.   else
  379.     put it *c/12 into x
  380.   end if
  381.   calculate
  382. end mouseUp
  383.  
  384.  
  385.  
  386. -- part 19 (field)
  387. -- low flags: 01
  388. -- high flags: 0002
  389. -- rect: left=235 top=279 right=299 bottom=366
  390. -- title width / last selected line: 0
  391. -- icon id / first selected line: 0 / 0
  392. -- text alignment: 1
  393. -- font id: 0
  394. -- text size: 12
  395. -- style flags: 0
  396. -- line height: 16
  397. -- part name: 
  398.  
  399.  
  400. -- part 25 (button)
  401. -- low flags: 00
  402. -- high flags: 0000
  403. -- rect: left=283 top=258 right=280 bottom=383
  404. -- title width / last selected line: 0
  405. -- icon id / first selected line: 0 / 0
  406. -- text alignment: 1
  407. -- font id: 0
  408. -- text size: 12
  409. -- style flags: 0
  410. -- line height: 16
  411. -- part name: 
  412.  
  413.  
  414. -- part 20 (button)
  415. -- low flags: 00
  416. -- high flags: A002
  417. -- rect: left=348 top=86 right=108 bottom=448
  418. -- title width / last selected line: 0
  419. -- icon id / first selected line: 0 / 0
  420. -- text alignment: 1
  421. -- font id: 0
  422. -- text size: 12
  423. -- style flags: 0
  424. -- line height: 16
  425. -- part name: Nautical Miles
  426. ----- HyperTalk script -----
  427. on mouseUp
  428.   global x
  429.   put .304799999985 into c
  430.   ask "Enter Value"
  431.   put it *1.15156*c*5280 into x
  432.   calculate
  433. end mouseUp
  434.  
  435.  
  436.  
  437.  
  438. -- part 21 (field)
  439. -- low flags: 01
  440. -- high flags: 0002
  441. -- rect: left=348 top=107 right=127 bottom=448
  442. -- title width / last selected line: 0
  443. -- icon id / first selected line: 0 / 0
  444. -- text alignment: 1
  445. -- font id: 0
  446. -- text size: 12
  447. -- style flags: 0
  448. -- line height: 16
  449. -- part name: 
  450.  
  451.  
  452. -- part 26 (button)
  453. -- low flags: 00
  454. -- high flags: A002
  455. -- rect: left=348 top=143 right=165 bottom=448
  456. -- title width / last selected line: 0
  457. -- icon id / first selected line: 0 / 0
  458. -- text alignment: 1
  459. -- font id: 0
  460. -- text size: 12
  461. -- style flags: 0
  462. -- line height: 16
  463. -- part name: Light-Second
  464. ----- HyperTalk script -----
  465. on mouseUp
  466.   global x
  467.   ask "Enter Value"
  468.   put it * 299793052.4119 into x
  469.   calculate
  470. end mouseUp
  471.  
  472.  
  473.  
  474. -- part 27 (field)
  475. -- low flags: 01
  476. -- high flags: 0002
  477. -- rect: left=348 top=164 right=184 bottom=448
  478. -- title width / last selected line: 0
  479. -- icon id / first selected line: 0 / 0
  480. -- text alignment: 1
  481. -- font id: 0
  482. -- text size: 12
  483. -- style flags: 0
  484. -- line height: 16
  485. -- part name: 
  486.  
  487.  
  488. -- part contents for card part 3
  489. ----- text -----
  490. 1.609344
  491.  
  492. -- part contents for card part 4
  493. ----- text -----
  494. 1609.344
  495.  
  496. -- part contents for card part 7
  497. ----- text -----
  498. 160934.399992
  499.  
  500. -- part contents for card part 8
  501. ----- text -----
  502. 1609343.999921
  503.  
  504. -- part contents for card part 9
  505. ----- text -----
  506. 1
  507.  
  508. -- part contents for card part 10
  509. ----- text -----
  510. 1760
  511.  
  512. -- part contents for card part 11
  513. ----- text -----
  514. 5280
  515.  
  516. -- part contents for card part 12
  517. ----- text -----
  518. 5280' , 0"
  519.  
  520. -- part contents for card part 13
  521. ----- text -----
  522. 63360
  523.  
  524. -- part contents for card part 19
  525. ----- text -----
  526. 63360"  ,   0 /32
  527.  
  528. -- part contents for card part 21
  529. ----- text -----
  530. 0.868387
  531.  
  532. -- part contents for card part 27
  533. ----- text -----
  534. 0.000005
  535.  
  536. -- part contents for background part 5
  537. ----- text -----
  538. 1 --,kilometers,kilometer,klm,km,
  539. 2 --,meters,meter,metre,m,
  540. 3 --,cm,centimeter,centimeters,
  541. 4 --,mm,milimeter,millimeters,
  542. 5 --,mile,miles,mi,
  543. 6 --,yard,yards,yd,yr,
  544. 7 --,foot,feet,ft,
  545. 9 --,inch,inches,in,
  546. 10 
  547. 11 --,nautical mile,nautical miles,nautical,nautical mi,nm,n m,n mi,
  548. 12 --,light-second,light second,light sec,light-sec,light s,light-s,